package cn.ekuma.rabbit.imp;

import com.openbravo.pos.base.AppProperties;

import cn.ekuma.rabbit.ModelManager;
import cn.ekuma.rabbit.spi.I_App;

public abstract class AbstractApp implements I_App {
	
	protected ModelManager modelManager;
	
	protected AppProperties properties;
	
	APP_STATE curentState;
	
	public AbstractApp(ModelManager modelManager) {
		this.modelManager=modelManager;
		 properties=modelManager.getConfigModel().properties;
		 curentState=APP_STATE.STOPED;
	}

	public ModelManager getManager() {
		return modelManager;
	}

	@Override
	public void start() {
		curentState=APP_STATE.RUN;	
	}

	@Override
	public void stop() {
		curentState=APP_STATE.STOPED;
	}

	@Override
	public APP_STATE getCurrentState() {
		return this.curentState;
	}

}
